#ifndef _RECT_H_LULY_
#define _RECT_H_LULY_

struct Rect {
  int x, y;
  int width, height;
};

//求[a1,b1]和[a2,b2]交集的长度
int overlap(int a1, int b1, int a2, int b2);

//求两矩形交集
Rect rectIntersection(const Rect& rect1, const Rect& rect2);

#endif